home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / Buildable, limited OOFILE / OOFILE headers / oof0.inl < prev    next >
Encoding:
Text File  |  1995-09-25  |  1.8 KB  |  99 lines  |  [TEXT/CWIE]

  1. // COPYRIGHT 1994 A.D. Software, All rights reserved
  2.  
  3. // minimal root public layer of OOFILE database
  4. // inline definitions
  5.  
  6.  
  7. // -------------------------------------------------------
  8. //                 O O F _ D i c t r e p
  9. // -------------------------------------------------------
  10. inline OOF_bitPointer& OOF_DictRep::item(unsigned int index)
  11.     return operator[](index); 
  12. }
  13.  
  14.  
  15. // -------------------------------------------------------
  16. //               O O F _ D i c t i o n a r y
  17. // -------------------------------------------------------
  18.  
  19. inline unsigned int OOF_Dictionary::count() const
  20. {
  21.     return mRep->mNextFreeEntry;
  22. }
  23.  
  24.  
  25. inline void OOF_Dictionary::start() 
  26. {
  27.     mInternalIter = 0;
  28. }
  29.  
  30.  
  31. inline bool OOF_Dictionary::more() 
  32. {
  33.     return mInternalIter < mRep->mNextFreeEntry;
  34. }
  35.  
  36.  
  37. inline void OOF_Dictionary::next() 
  38. {
  39.     mInternalIter++;
  40. }
  41.  
  42.  
  43. inline bool OOF_Dictionary::EntryMatchesVisibility(const dbClass* entry, bool wantVisible) const 
  44. {
  45.         bool isVisible = !entry->hidden();
  46.         return ((isVisible && wantVisible) || (!isVisible && !wantVisible));
  47. }
  48.  
  49.  
  50. inline void OOF_Dictionary::startVisible(bool wantVisible) 
  51. {
  52.     start();
  53.     moreVisible(wantVisible);
  54. }
  55.  
  56.  
  57. inline void OOF_Dictionary::nextVisible(bool wantVisible)
  58. {
  59.     next();
  60.     moreVisible(wantVisible);
  61. }
  62.  
  63.  
  64. inline void OOF_Dictionary::append(OOF_bitPointer aBit)  
  65. {
  66.     mRep->Append(aBit);
  67. }
  68.  
  69.  
  70. inline void OOF_Dictionary::reset()  
  71. {
  72.     mRep->Reset();
  73. }
  74.  
  75.  
  76.  inline OOF_bitPointer& OOF_Dictionary::operator()() // current value
  77.     return mRep->operator[](mInternalIter); 
  78. }
  79.  
  80.  
  81. inline OOF_bitPointer& OOF_Dictionary::operator[](int index)
  82. {
  83.     assert(index>=0);
  84.     return mRep->item(index);
  85. }
  86.  
  87.  
  88. inline OOF_bitPointer& OOF_Dictionary::item(unsigned int index)
  89.     return mRep->item(index); 
  90. }
  91.  
  92.  
  93. inline OOF_bitPointer OOF_Dictionary::value(unsigned int index) const
  94.     return mRep->value(index); 
  95. }